/*
 * @Author: KKKKKK
 * @Date: 2021-01-10 12:08:35
 * @LastEditors: KKKKKK
 * @LastEditTime: 2021-01-10 12:08:35
 */
import axios from './config'
import url from './url'
const baseUrl = process.env.VUE_APP_BASE_URL

/* 行业 */
// 新增行业
const classificationCreate = (params) => axios.post(baseUrl + url.classification.create, params)

// 删除行业
const classificationDelete = (id) => axios.delete(baseUrl + url.classification.delete + `/${id}`)

// 修改行业
const classificationUpdate = (params, id) => axios.post(baseUrl + url.classification.update + `/${id}`, params)

// 获取某个行业
const classificationLoad = (id) => axios.get(baseUrl + url.classification.load + `/${id}`)

// 获取行业列表
const classificationPage = (params) => axios.get(baseUrl + url.classification.page, { params })

export default {
    classificationCreate,
    classificationDelete,
    classificationUpdate,
    classificationLoad,
    classificationPage,
}